package com.heima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.heima.common.PageResult;
import com.heima.pojo.User;
import com.heima.pojo.vo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from tb_user where login_name = #{loginName}")
    User selectOne(User user);


    Page<UserVo> search(Page<UserVo> page, String userName);

    List<Map<String,Object>> repairerList(String innerCode);

    List<Map<String, Object>> operatorList(String innerCode);

    Page<UserVo> searchUserWork(Page<UserVo> page, String userName, Integer roleId, Boolean isRepair);

    UserVo getUser(Integer id);
}
